Path: api/v1/stock/{stockno}/locations
This API is JSON:API compliant.
This endpoint supports the following methods:
GET
This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.
The resource type for this endpoint is StockLocations
The identifier is stockNo-locationNo
Attributes
The StockLocations resource type attributes are as follows:
| Attribute | Type | Description |
|---|---|---|
| branchCode | string | The branch code. Branches are optional in Jim2 - this is only set when your site is configured to use branches. Note: Will not be returned in the response if value is null. |
| branchNo | integer | The internal branch number used to identify the branch. Branches are optional in Jim2 - this is only set when your site is configured to use branches. Note: Will not be returned in the response if value is null. |
| configNo | integer | The stock attribute configuration number for this location entry. Note: Will not be returned in the response if value is null. |
| daysSupply | integer | Days Supply allows users to specify how many days’ worth of this stock they wish to purchase or transfer, based on average usage. Note: Will not be returned in the response if value is null. |
| limitQty | number | Limit Qty provides a way of putting an absolute limit on how much stock to order. Note: Will not be returned in the response if value is null. |
| line | integer | The line number of the stock location entry. |
| locationCode | string | The stock location code. |
| locationNo | integer | The internal location number used to identify the location. |
| maxQtyBin1 | number | Max Qty allows entering the maximum quantity that will fit in the bin. This is used only if the Jim2 licence key includes Warehouse Management. Note: Will not be returned in the response if value is null. |
| maxQtyBin2 | number | This is used only if the Jim2 licence key includes Warehouse Management. Note: Will not be returned in the response if value is null. |
| minQtyHigh | number | The Min Qty High procurement parameter — the upper bound of the purchasing window (see minQtyLow). Note: Will not be returned in the response if value is null. |
| minQtyLow | number | The Min Qty Low and Min Qty High procurement parameters provide a window for purchasing, and provide a way of batching orders, rather than ordering the same stock every day. Note: Will not be returned in the response if value is null. |
| primaryBin1 | string | Bin – the space within a bay/level combination. Note: Will not be returned in the response if value is null. |
| primaryBin2 | string | This is used only if the Jim2 licence key includes Warehouse Management. Note: Will not be returned in the response if value is null. |
| reorderQty | number | Reorder Qty can be at a stock or stock location level. If a location level reorder quantity is specified it will be used, otherwise the stock’s default reorder quantity will be used. Note: Will not be returned in the response if value is null. |
| zone | string | Zones are a further extension of the warehouse management process that enhance the usability of warehousing. This is used only if the Jim2 licence key includes Warehouse Management. Note: Will not be returned in the response if value is null. |
Path: api/v1/stock/2/locations Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response. This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above). Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.
Example GET (Return all)
{
"data": [
{
"id": "2-1",
"type": "StockLocations",
"attributes": {
"line": 1,
"branchNo": 1,
"branchCode": "ACT",
"locationNo": 1,
"locationCode": "ACT",
"minQtyLow": 1.0,
"minQtyHigh": 10.0,
"limitQty": 20.0,
"reorderQty": 5.0,
"daysSupply": 5,
"zone": "A",
"primaryBin1": "1.2.3.BIN1",
"maxQtyBin1": 1.0,
"primaryBin2": "A.A.1.1.2",
"maxQtyBin2": 20.0,
"configNo": 3
}
},
{
"id": "2-2",
"type": "StockLocations",
"attributes": {
"locationCode": "NSW",
"line": 2
}
},
{
"id": "2-3",
"type": "StockLocations",
"attributes": {
"locationCode": "NT",
"line": 3
}
}
]
}
Path: api/v1/stock/2/locations/2-2 Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example GET (Return specific)
{
"data": {
"id": "2-2",
"type": "StockLocations",
"attributes": {
"line": 2,
"branchNo": 2,
"branchCode": "NSW",
"locationNo": 2,
"locationCode": "NSW",
"minQtyLow": 2.0,
"minQtyHigh": 11.0,
"limitQty": 21.0,
"reorderQty": 6.0,
"daysSupply": 6,
"zone": "A",
"primaryBin1": "A.A.1.2.2",
"maxQtyBin1": 2.0,
"primaryBin2": "A.A.2.3.1",
"maxQtyBin2": 3.0,
"configNo": 4
},
"links": {
"self": "/api/v1/stock/2/locations/2-2"
}
}
}